#!/sbin/openrc-run

supervisor=supervise-daemon

name="Drone CI server"

command="/usr/bin/drone-server"
command_args="-env-file ${env_file:-/etc/drone.conf}"
command_user="drone:drone"
directory="/var/lib/drone"

error_log="/var/log/drone.log"

depend() {
	need net
	after firewall
}

start_pre() {
	checkpath -d -m 755 -o "drone:drone" /var/lib/drone
	checkpath -f -m 644 -o "drone:drone" /var/log/drone.log
}
